<%-- 
    Document   : view_article
    Created on : Mar 3, 2012, 1:13:09 AM
    Author     : eugene
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>
            <c:choose>
                <c:when test="${article != null}">
                    ${article.title}
                </c:when>
                <c:otherwise>
                    Error
                </c:otherwise>
            </c:choose>
        </title>
        <script type="text/javascript">
            $(document).ready(function() {
                //$(".paragraph")
            });
        </script>
    </head>
    <body>
        <div style="width: 80%; margin-left:10%">
            <c:choose>
                <c:when test="${article == null}">
                    <h1>Document doesn't find!</h1>
                </c:when>
                <c:otherwise>
                    <h2 id="articleTitle">${article.title}</h2>
                    <div id="articleBody">
                        <c:forEach items="${docBlocks}" var="docBlock">
                            ${docBlock.data}
                        </c:forEach>
                    </div>
                </c:otherwise>
            </c:choose>
        </div>
    </body>
</html>
